package luanluan.utils 
{
	/**
	 * 文本(字符)工具
	 * @author luanluan
	 */
	public class TextUtils 
	{
		
		/**
		 * 替换文本
		 * @param	source
		 * @param	oldStr
		 * @param	newStr
		 * @return
		 */
		public function replace(source:String ,oldStr:String, newStr:String):String
		{
			var index:int;
			while (index = source.indexOf(oldStr) != -1)
			{
				source = source.replace(oldStr, newStr);
			}
			return source;
		}
		
	}

}